package com.artislong.service;

import lombok.Data;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.ai.tool.annotation.ToolParam;
import org.springframework.stereotype.Service;

/**
 * @author 陈敏
 * @version TestService.java, v 1.0 2025 07 29 21:17 chenmin Exp $
 * Created on 2025 07 29
 */
@Service
public class TestService {

    @Tool(description = "测试方法")
    public String test(@ToolParam(description = "测试参数") TestBean testBean) {
        return "hello " + testBean.getName() + ", your age is " + testBean.getAge();
    }

    @Data
    public static class TestBean {
        @ToolParam(description = "姓名")
        private String name;
        @ToolParam(description = "年龄")
        private String age;
    }
}
